<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>增加用户</title>
<link rel="stylesheet" href="../css/admin.css">
<script type="text/javascript" src="../js/cal/jquery-1.7.js">
	
</script>
<script>
	function checkForm() {
		if ($("#name").val() == "") {
			$("#tips_name").html("用户名不能为空！");
			$("#name").focus();
			return false;
		} else {
			$("#tips_name").html("OK！");

		}

		if ($("#pwd").val() == "") {
			$("#tips_pwd").html("密码不能为空！");
			$("#pwd").focus();
			return false;
		} else {
			$("#tips_pwd").html("OK！");

		}

		if ($("#pwd").val().length < 6 || $("#pwd").val().length > 18) {
			$("#tips_pwd").html("密码长度须在6-18之间！");
			$("#pwd").focus();
			return false;
		} else {
			$("#tips_pwd").html("OK！");

		}
		if ($("#pwd").val() != $("#repwd").val()) {
			$("#tips_repwd").html("两次输入的密码不一致！");
			$("#repwd").focus();
			return false;

		} else {

			$("#tips_repwd").html("OK！");
		}
		if ($("#account").val() == "") {
			$("#tips_account").html("帐号！");
			$("#account").focus();
			return false;
		} else {
			$("#tips_account").html("OK！");

		}

	}
</script>
</head>

<body>
	<form action="userservice?action=add" method="post" id="myform">
		<fieldset>
			用户基本信息
			<div>
				<label for="name" class="left">用户名：</label> <input type="text"
					name="name" id="name" onBlur="checkForm()" /> <span
					id="tips_name">*</span>
			</div>
			<div>
				<label for="pwd" class="left">密码：</label> <input
					type="password" name="pwd" id="pwd" onBlur="checkForm()" />
				<span id="tips_pwd">*</span>
			</div>
			<div>
				<label for="repwd" class="left">确认密码：</label> <input
					type="password" name="repwd" id="repwdd"
					onBlur="checkForm()" /> <span id="tips_repwd">*</span>
			</div>
			<div>
				<label for="account" class="left">帐号：</label> <input type="text"
					name="account" id="account" /> <span id="tips_account">*</span>
			</div>
			<div>
				<label for="headImage" class="left">头像：</label> <input type="text"
					name="headImage" id="headImage" /> <span id="tips_headImage">*</span>
			</div>
				<div>
				<label for="email" class="left">邮箱：</label> <input type="text"
					name="email" id="email" /> <span id="tips_email">*</span>
			</div>
				<div>
				<label for="mood" class="left">心情：</label> 
				<select name="mood" >
					<option vlue="最近很好">最近很好</option>
					<option vlue="最近很好">最近一般</option>
					<option vlue="最近很好">最近比较差</option>
				</select>
			    <span id="tips_mood">*</span>
			</div>
			<div class="submit">
				<input type="submit" value="提交" class="button" /> <input
					type="reset" value="重置" class="button" />
			</div>
		</fieldset>
	</form>
</body>
</html>
